<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<%@ include file="../jspf/metadata.jspf"%>
		<title>喂哟_表达观点，倾听声音</title>
		<link href="css/main.css" rel="stylesheet" type="text/css">
		<script src="js/jquery-1.8.3.min.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script type="text/javascript" src="js/main.js"></script>

	</head>

	<body>

		<%@ include file="../jspf/header.jspf"%>
		<!-- 定义中部页面区域 -->
		<div id="content">
			<!-- 定义主体内容区域 -->
			<div id="page">
				<!-- 定义左侧分栏 -->
				<div id="left">
					<s:if test="%{userId == currentUser.iduser}">
						<div id="marker"></div>
						<form class="publish-area" action="publish.action" method="post">
							<input type="hidden" name="userId"
								value="<s:property value='currentUser.iduser'/>" />
							<textarea name="publishContent" id="content_textarea"
								onkeyup="checkContent();" onkeydown="checkContent();"
								onfocus="checkContent();"></textarea>
							<%@ include file="../jspf/publish_bar.jspf"%>

							<input type="image" class="sys-pic" id="publish-button"
								src="img/transparent.png" onclick="return checkEmpty();" />
							<!-- 字数统计区域 -->
							<div id="word-count-tip">
								还可输入
								<span id="word-count">140</span>字
							</div>
						</form>
					</s:if>
					<div class="clear"></div>


					<!-- 定义展示区 -->
					<div id="show-area">
						<!--定义标签、印象展示区-->
						<div id="show-tags-impressions">
							<div id="show-tags">
								<s:if test="%{userId == currentUser.iduser}">
									<span class="tags-title">我的标签</span>
									<ul class="tags-list">
										<s:if test="tagList.size!=0">
											<s:iterator value="tagList" var="tagElement">
												<li class="tag">
													<span class="tagValue">&nbsp <s:property
															value='#tagElement.tagtxt' /> </span><span class="splitLine">&nbsp|</span>
													<form action="deleteTag.action" method="post"
														style="display: inline">
														<input type="hidden" name="tagId"
															value="<s:property value='#tagElement.idtag'/>" />
														<input type="hidden" name="visitId"
															value="<s:property value='userId'/>" />
														<input type="image" class="deleteBtn" src="img/cancel.png"></input>
													</form>
												</li>
											</s:iterator>
										</s:if>
										<s:else>
											<li class="specialTag">
												还没有标签呐~快给自己加个标签吧~
											</li>
										</s:else>
										<form action="addTag.action" method="post" class="specialTag">
											<input name="visitId" type="hidden"
												value="<s:property value='userId'/>" />
											<input name="tagContent" />
											<input type="image" class="deleteBtn" src="img/plus.png"></input>
										</form>
									</ul>
								</s:if>
								<s:else>
									<span class="tags-title">TA的标签</span>
									<ul class="tags-list">
										<s:if test="tagList.size!=0">
											<s:iterator value="tagList" var="tagElement">
												<li class="tag">
													<span class="tagValue">&nbsp<s:property
															value='#tagElement.tagtxt' />&nbsp</span>
												</li>
											</s:iterator>
										</s:if>
										<s:else>
											<li class="specialTag">
												TA还没有标签哦~
											</li>
										</s:else>
									</ul>

								</s:else>
							</div>
							<div class="clear"></div>

							<div id="show-impressions">
								<s:if test="%{userId == currentUser.iduser}">
									<div class="tags-title">
										我的好友印象
									</div>
									<ul class="tags-list">
										<s:if test="impressionList.size!=0">
											<s:iterator value="impressionList" var="impressionElement">
												<li class="tag">
													<span class="tagValue">&nbsp <s:property
															value='#impressionElement.impression' /> </span><span
														class="splitLine">&nbsp|</span>
													<form action="deleteImpression.action" method="post"
														style="display: inline">
														<input type="hidden" name="impressionId"
															value="<s:property value='#impressionElement.idimpression'/>" />
														<input type="hidden" name="visitId"
															value="<s:property value='userId'/>" />
														<input type="image" class="deleteBtn" src="img/cancel.png"></input>
													</form>
												</li>
											</s:iterator>
										</s:if>
										<s:else>
											<li class="specialTag">
												还没有好友给你添加印象哦~快邀请他们呐~
											</li>
										</s:else>
									</ul>
								</s:if>
								<s:else>
									<div class="tags-title">
										TA的好友印象
									</div>
									<ul class="tags-list">
										<s:if test="impressionList.size!=0">
											<s:iterator value="impressionList" var="impressionElement">
												<li class="tag">
													<span class="tagValue">&nbsp<s:property
															value='#impressionElement.impression' />&nbsp</span>
													<s:if test="%{userId == #impressionElement.relation.source.iduser}">
													<form action="deleteImpression.action" method="post"
														style="display: inline">
														<input type="hidden" name="impressionId"
															value="<s:property value='#impressionElement.idimpression'/>" />
														<input type="hidden" name="visitId"
															value="<s:property value='currentUser.iduser'/>" />
														<input type="image" class="deleteBtn" src="img/cancel.png"></input>
													</form>
													</s:if>
												</li>
											</s:iterator>
										</s:if>
										<s:else>
											<li class="specialTag">
												TA还没有好友给他添加印象呐~快来给他加一个~
											</li>
										</s:else>
										<s:if test="isFollowed==true">
											<form action="addImpression.action" method="post"
												class="specialTag">
												<input name="visitId" type="hidden"
													value="<s:property value='currentUser.iduser'/>" />
												<input name="impressionContent" />
												<input type="image" class="deleteBtn" src="img/plus.png"></input>
											</form>
										</s:if>
										<s:else>
											<div class="clear"></div>
											<li class="specialTag">
												可惜你还没关注TA~快关注一下吧~
											</li>
										</s:else>
									</ul>
								</s:else>
							</div>
						</div>
						<div class="clear"></div>

						<!-- 微博展示区上方导航栏 -->
						<div id="show-bar">
							<s:if test="%{userId == currentUser.iduser}">
								<div id="my-broadcast">
									我的喂哟
								</div>
							</s:if>
							<s:else>
								<div id="my-broadcast">
									TA的喂哟
								</div>
							</s:else>

							<div class="clear"></div>
						</div>
						<!-- 微博内容列表 -->
						<ul id="blog-list">
							<s:if test="mblogList.size!=0">
								<s:iterator value="mblogList" var="MyMblog">
									<li class="blog-item">
										<a
											href="gotoMain.action?userId=<s:property value='#MyMblog.publisher.iduser'/>"
											class="avatar"><img
												src="img/avatar/<s:property value='#MyMblog.publisher.avatar'/>">
										</a>
										<div class="blog-content">
											<div class="text-content">
												<a
													href="gotoMain.action?userId=<s:property value='#MyMblog.publisher.iduser'/>"
													class="blogger-name"
													id="blogger<s:property value='#MyMblog.idmblog'/>"><s:property
														value='#MyMblog.publisher.nickname' /> </a>：
												<span class="real-text-content"
													id="blog<s:property value='#MyMblog.idmblog'/>"><s:property
														value="#MyMblog.mblogTxt" /> </span>
											</div>
											<div class="media-content"></div>
											<s:if test="#MyMblog.originalMblog !=null">

												<div class="cite-box"
													id="cite<s:property value='#MyMblog.idmblog'/>">
													<div class="triangle">
														◆
													</div>
													<div class="blog-content">
														<div class="text-content">
															<a
																href="gotoMain.action?userId=<s:property value='#MyMblog.originalMblog.publisher.iduser'/>"
																class="blogger-name"><span>@</span> <s:property
																	value='#MyMblog.originalMblog.publisher.nickname' /> </a>：
															<span class="real-text-content"><s:property
																	value='#MyMblog.originalMblog.mblogTxt' /> </span>
														</div>
														<div class="media-content"></div>
														<div class="info-bar">
															<span class="time"><s:property
																	value='#MyMblog.originalMblog.mblogTime' /> </span>
															<span class="agent">来自<span class="agent-content">网页</span>
															</span>
														</div>
													</div>
												</div>

											</s:if>
											<!-- 微博信息底栏 -->
											<div class="info-bar">
												<span class="time"><s:property
														value='#MyMblog.mblogTime' /> </span>
												<span class="agent">来自<span class="agent-content">网页</span>
												</span>
												<span class="blog-func"><a
													onclick="showForward(<s:property value='#MyMblog.idmblog'/>);"
													class="forward">转发</a><span>|</span><a
													onclick="showComment(<s:property value='#MyMblog.idmblog'/>);"
													class="give-comment">评论</a> </span>
											</div>
											<!-- 转发框 -->
											<div class='comment-box'
												id="forward<s:property value='#MyMblog.idmblog'/>"
												style="display: none;">
												<div class='triangle' style="margin-right: 35px;">
													◆
												</div>
												<form id="forwardForm<s:property value='#MyMblog.idmblog'/>"
													action="forward.action" method="post">
													<input type="hidden" name="idtargetmblog"
														value="<s:property value='#MyMblog.idmblog'/>" />
													<input type="hidden" name="idpublisher"
														value="<s:property value='userId'/>" />
													<input name="visitId" type="hidden"
													value="<s:property value='currentUser.iduser'/>" />
													<div
														id="forwardFormArea<s:property value='#MyMblog.idmblog'/>"></div>
													<div class='clear'></div>

												</form>
											</div>
											<!-- 评论框 -->
											<div class='comment-box'
												id="comment<s:property value='#MyMblog.idmblog'/>"
												style="display: none;">
												<div class='triangle'>
													◆
												</div>
												<ul class='comments-list'
													id="commentList<s:property value='#MyMblog.idmblog'/>">
												</ul>
												<form id="commentForm<s:property value='#MyMblog.idmblog'/>"
													action="addComment.action" method="post">
													<input type="hidden" name="commentIdtargetmblog"
														value="<s:property value='#MyMblog.idmblog'/>" />
													<input type="hidden" name="commentIdpublisher"
														value="<s:property value='userId'/>" />
													<input name="visitId" type="hidden"
													value="<s:property value='currentUser.iduser'/>" />
													<div
														id="commentFormArea<s:property value='#MyMblog.idmblog'/>"></div>
													<div class='clear'></div>
												</form>
											</div>
										</div>
									</li>


								</s:iterator>
							</s:if>
							<s:else>
								<li style="float: left; margin-left: 16px;">
									喔唷，还没有发过喂哟！快来发一条~!
								</li>
							</s:else>
						</ul>
					</div>
				</div>
				<%@ include file="../jspf/right_bar.jspf"%>
				<div class="clear"></div>
			</div>
		</div>

		<%@ include file="../jspf/l_footer.jspf"%>
	</body>
</html>
